<!DOCTYPE html>
<html lang="en">
<head>
   <meta charset="UTF-8">
   <title>用户信息-插入html片段</title>
   <script src="vue.js"></script>
</head>
<body>
   <div id="app">
      <p v-html="sayHello()"></p>
      <ul>
         <li>姓名 : {{name}}</li>
         <li>城市 : {{city}}</li>
      </ul>
   </div>
   <script>
      let user = {
            name : "Chance",
            city  : "Beijing"
         };
      let vm = new Vue({
         el: '#app',
         data: user,
         methods:{
            sayHello(){
               return `您好，欢迎来自 <b>${this.city}</b> 的 <b>${this.name}</b> ！`
            }
         }
      })      
   </script>
</body>
</html>
